import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("alumni_auth_record", { schema: "alumni" })
export class AlumniAuthRecord {
  @PrimaryGeneratedColumn({ type: "int", name: "id", unsigned: true })
  id: number;

  @Column("int", { name: "user_id", unsigned: true, default: () => "'0'" })
  userId: number;

  @Column("int", { name: "school_id", unsigned: true, default: () => "'0'" })
  schoolId: number;

  @Column("tinyint", {
    name: "level",
    comment: "1：小学，2：中学，",
    unsigned: true,
    default: () => "'0'",
  })
  level: number;

  @Column("year", {
    name: "graduate_date",
    nullable: true,
    comment: "毕业年份",
  })
  graduateDate: number | null;

  @Column("varchar", { name: "class_name", comment: "班级", length: 100 })
  className: string;

  @Column("tinyint", { name: "status", comment: "状态", default: () => "'0'" })
  status: number;

  @Column("varchar", { name: "reason", comment: "原因", length: 100 })
  reason: string;

  @Column("int", {
    name: "create_time",
    comment: "发起时间",
    unsigned: true,
    default: () => "'0'",
  })
  createTime: number;

  @Column("int", {
    name: "complete_time",
    comment: "发起时间",
    unsigned: true,
    default: () => "'0'",
  })
  completeTime: number;
}
